package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 付款计划
 * </p>
 *
 * @author yinjc123
 * @since 2018-04-03
 */
@TableName("crm_pay_plan")
@Getter
@Setter
@ToString
public class PayPlan extends Model<PayPlan> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 月份
     */
    @NotBlank(message = "月份不能为空")
    private String month;

    /**
     * 客户企业id
     */
    @TableField("customer_company_id")
    @NotNull(message = "客户企业id不能为空")
    private Integer customerCompanyId;
    /**
     * 供应商名称
     */
    @TableField("provider_name")
    @NotBlank(message = "供应商名称不能为空")
    private String providerName;
    /**
     * 付款金额
     */
    @TableField("pay_amount")
    @NotNull(message = "付款金额不能为空")
    private BigDecimal payAmount;
    /**
     * 现金
     */
    private BigDecimal crash;
    /**
     * 银票
     */
    @TableField("silver_ticket")
    private BigDecimal silverTicket;
    /**
     * 银票期限
     */
    @TableField("silver_ticket_period")
    private Integer silverTicketPeriod;
    /**
     * 商票
     */
    @TableField("business_ticket")
    private BigDecimal businessTicket;
    /**
     * 商票期限
     */
    @TableField("business_ticket_period")
    private Integer businessTicketPeriod;
    /**
     * 航信
     */
    private BigDecimal hangxin;
    /**
     * 航信期限
     */
    @TableField("hangxin_period")
    private Integer hangxinPeriod;

    /**
     * 逻辑删除
     */
    @TableField(value = "delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
